package com.aj.http.request;

import java.util.HashMap;

import org.json.JSONException;
import org.json.JSONObject;

import com.aj.application.LoveHomeApplication;

public class BaseRequset {

	protected static final String SERVICE_LOGIN_STRING = "aj_user_login";
	protected static final String SERVICE_LOGOUT_STRING = "aj_user_logout";
	protected static final String SERVICE_VERIFICATION_STRING = "aj_user_reg_sms_apply";
	protected static final String SERVICE_TASK_LIST_STRING = "aj_task_list";
	protected static final String SERVICE_FORGETPASSWORD_STRING = "aj_forget_pwd";
	protected static final String SERVICE_USERINFO_STRING = "aj_user_Info";
	protected static final String SERVICE_UPDATE_STRING = "btcs_clt_update";
	protected static final String SERVICE_UPDATE_USERINFO_STRING = "aj_user_mgr";
	protected static final String SERVICE_REGISTER_STRING = "aj_user_reg_sms_validate";
	protected static final String SERVICE_MYFAMILYLIST_STRING = "aj_my_family_list";
	protected static final String SERVICE_UPDATEPASSWORD_STRING = "aj_update_pwd";
	protected static final String SERVICE_OPINION_STRING = "aj_feedback";
	protected static final String SERVICE_FAMILY_ZONE_STRING = "aj_zone_by_family_list";
	protected static final String SERVICE_FAMILY_RELATION_STRING = "aj_family_relation_list";

	protected static final String SERVICE_FAMILY_ZONE_MANAGER_STRING = "aj_album_mgr";
	protected static final String SERVICE_ZONE_PHOTO_LIST_MANAGER_STRING = "aj_zone_photo_list";
	protected static final String SERVICE_UPDATE_JHPUSH_CHANNEL_STRING = "aj_update_jHPush_channel_servcie";
	protected static final String SERVICE_ADD_PHOTO_STRING = "aj_album_photo_add";
	protected static final String SERVICE_ALBUM_LIST_STRING = "aj_album_list";
	protected static final String SERVICE_ALBUM_PHOTO_MGR_STRING = "aj_album_photo_mgr";
	protected static final String SERVICE_ADD_FAMILY_BYID_STRING = "aj_family_byId_add";
	protected static final String SERVICE_MANAGE_PET_STRING = "aj_pet_mgr";
	protected static final String SERVICE_QUERY_PET_STRING = "aj_pet_query";
	protected static final String SERVICE_MANAGE_BABY_STRING = "aj_baby_mgr";
	protected static final String SERVICE_QUERY_BABY_STRING = "aj_baby_query";

	protected static final String SERVICE_SYS_MSG_ALERT_STRING = "aj_sys_msg_alert_mng";
	protected static final String SERVICE_QUERY_SYS_MSG_STRING = "aj_query_sys_msg_alert";
	protected static final String SERVICE_PHOTO_REPORT_STRING = "aj_photo_report";
	protected static final String SERVICE_PHOTO_DIG_STRING = "aj_photo_dig";
	protected static final String SERVICE_CMT_MGR_STRING = "aj_cmt_mgr";
	protected static final String SERVICE_FAMILY_QUERY_STRING = "aj_family_query";

	protected static final String SERVICE_CHILDREN_MGR_STRING = "aj_children_mgr";
	protected static final String SERVICE_CHILDREN_QUERY_STRING = "aj_children_query";
	protected static final String SERVICE_FAMILY_MGR_STRING = "aj_family_mgr";
	protected static final String SERVICE_PRAY_LETTER_STRING = "aj_pray_letter_list";
	protected static final String SERVICE_PRAY_LETTER_ADD_STRING = "aj_pray_letter_add";
	protected static final String SERVICE_BABY_PHOTOS_STRING = "aj_baby_photos_query";
	protected static final String SERVICE_MARRY_DATE_SAVE_STRING = "aj_marrieddate_save";
	protected static final String SERVICE_GET_MARRY_DATE_STRING = "aj_marrieddate_query";
	protected static final String SERVICE_TASK_CANCEL_STRING = "aj_task_cancel";
	protected static final String SERVICE_TASK_ACCEPT_STRING = "aj_task_accept";
	protected static final String SERVICE_TASK_ADD_STRING = "aj_task_add";

	protected static final String SERVICE_QUERY_ALBUM_PHOTO_STRING = "aj_query_album_photo_service";
	protected static final String SERVICE_CONFIRM_RELATION_STRING = "aj_confirm_relation_service";

	protected static final String VERSION_STRING = "1.0";
	protected static final String MODLE_STRING = "11";
	protected static final String CANNELID_STRING = "100";
	protected static final String BASE_REQUEST_URL_NOPAGE_STRING = "http://mymost.gotoip55.com/service/proxy?t="
			+ LoveHomeApplication.token + "&v=" + VERSION_STRING;
	protected static final String BASE_UPLOADFILE_URL_NOPAGE_STRING = "http://mymost.gotoip55.com/service/fileUpload";
	protected static final String BASE_REQUEST_URL_STRING = "http://mymost.gotoip55.com/service/proxy?t="
			+ LoveHomeApplication.token
			+ "&v="
			+ VERSION_STRING
			+ "pageSize=%d&currentPage=%d";

	protected static final String CALLTYPE_STRING = "001";

	protected String getParams(String serviceName,
			HashMap<String, String> params) {
		JSONObject jsonObject = new JSONObject();
		try {
			jsonObject.put("serviceName", serviceName);
			jsonObject.put("callType", CALLTYPE_STRING);
			jsonObject.put("params", new JSONObject(params));
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return jsonObject.toString();
	}
}
